package ossController

import (
	"github.com/gogf/gf/net/ghttp"
	"guli-shopping/api-service/protobuff/OssProto"
	"log"
)

type OssController struct {
	Client OssProto.OssCheckerClient
}

func getOssRequest() *OssProto.OssRequest {
	return &OssProto.OssRequest{}
}

func (this *OssController) GetAuthUrl(request *ghttp.Request)  {
	userRequest := getOssRequest()
	filename := request.GetString("filename")
	userRequest.Filename=filename
	all, err := this.Client.GetAuthUrl(request.Context(),userRequest)
	if err != nil {
		//记录日志
		log.Println(err)
	}
	request.Response.WriteJson(all)
}


